Skip to main content

All Questions

Tagged with
4votes
1answer
242views

JSON4 parser in Typescript - Optimized

Context This review-request is a follow-up to this question. After the initial implementation, which focused on spec-compliance mainly, I have made some revisions to improve the performance of the ...
Patrick Hollweck's user avatar
2votes
1answer
166views

Powershell file parsing

I am using Powershell 7. We have the following PowerShell script that will parse some very large file. I no longer want to use 'Get-Content' as this is to slow. The script below works, but it takes a ...
Cell-o's user avatar
0votes
1answer
85views

Parsing shortcodes out of a string

I wrote this shortcode parsing and it runs in \$O(N^2)\$. Is there a way to better optimize this? ...
ericraio's user avatar
6votes
2answers
1kviews

Read a large CSV order book

I am trying to read entries of my CSV file into an entries vector whose data type is object OrderBookEntry, which is an object that stores the tokenized variables ...
Beginner_coder's user avatar
7votes
1answer
277views

Chess position representation with FEN parser

I'm developing a UCI chess engine and as part of my engine I need a position representation that stores the position of every piece on the board and all the information about the game, like castling ...
sayurc's user avatar
4votes
1answer
287views

Parsing an IP routing report with half a million lines into a PANDAS dataframe

I have a file that has around 440K lines of data. I need to read these data and find the actual "table" in the text file. Part of the text file looks like this. ...
ReverseEngineer's user avatar
3votes
1answer
62views

Quickly read numeric input

Do you have any criticisms or corrections or improvements? I need to read only numbers(and this numbers could be from 0 to 1000000) ...
Оля Швенда's user avatar
10votes
1answer
2kviews

Python script to analyse Apache log files

I am fairly new to Python programming language. Most of python programmers have heard the philosophy behind the python programming language. The code should be easy to read, easy to understand, simple,...
dovexz12323's user avatar
4votes
1answer
188views

Convert ASCII representations of phonetics to Unicode characters

Here is some working code for converting an input string to an output string: ...
Lance Pollard's user avatar
26votes
4answers
5kviews

Poor man's JIT using nested lambdas

While answering this code review question, I came up with a way to convert an equation given at runtime to a std::function<double(double)> that would evaluate ...
G. Sliepen's user avatar
3votes
2answers
568views

Handle missing children nodes when parsing XML into a dictionary

I work on a code-base that uses xml to set up problems and specify model parameters. I've created a script that I run in tandem with our code. This script will ...
dylanjm's user avatar
10votes
2answers
1kviews

Simple parser using Flex and C++

This is an alternative parser based on the specifications from this question. Briefly stated, the input file is a text file which has at least 33 fields separated by semicolons. If the fourth field ...
Edward's user avatar
  • 66.8k
39votes
6answers
6kviews

Parser written in PHP is 5.6x faster than the same C++ program in a similar test (g++ 4.8.5)

I'm absolutely dumbfounded by this. I was trying to demonstrate to myself how much faster C++ is than even modern PHP. I ran a simple CSV parsing program in both that have the same output. The CSV ...
Luke's user avatar
  • 491
3votes
1answer
2kviews

Parse HTML bookmarks file to JSON using python

I am currently working on a project for an online course, my goal is to create a bookmark manager web app. So I created this python script to parse a chrome/firefox HTML bookmarks file (Netscape-...
Adam's user avatar
  • 183
4votes
1answer
231views

A mathematical expression parser with custom data structures

I recently wrote a mathematical expression parser in C++. The software can read valid mathematical expressions and evaluate them. An example of an expression the code can parse is ...
Amaldev Haridevan's user avatar

153050per page
close